package com.yenlien.traceyun.plant.dao;

import com.yenlien.traceyun.plant.entity.ColdUser;
import com.yenlien.traceyun.webase.dao.BaseJpaDao;
import org.springframework.data.jpa.repository.Query;

import java.util.List;

public interface ColdUserDao extends BaseJpaDao<ColdUser> {

    @Query(value = "SELECT * FROM t_cold_user WHERE company_id = ?1 AND user_type = '1'", nativeQuery = true)
    List<ColdUser> findByCompanyId(String companyId);

    List<ColdUser> findByPhone(String phone);


    ColdUser findById(String id);

}
